<template>
    <div id="VJAddr">
        <el-cascader
                v-model="fakeValue"
                v-bind="combineConfig"
                v-on="bindListeners"/>
    </div>
</template>
<script lang="ts">
    import Vue, {ComponentOptions, VueConstructor} from "vue"
    import Component, {mixins} from 'vue-class-component'
    import {FormMixin} from "./mixins/form-mixin";
    import {Prop} from "vue-property-decorator";
    import {defaultProp, ModelSync} from "vijay-util";
    import {VInput, VAddr} from "./config/form";

    @Component
    export default class VJAddr extends mixins(FormMixin) implements ComponentOptions<Vue> {
        name = "VJNumber";
        @Prop() cmp!: string;
        @Prop() propName!: string;
        @Prop() value!: string;
        get fakeValue() {
            return Array.isArray(this.value) ? this.value.filter(Boolean) : this.value
        }
        set fakeValue(v) {
            return this.value = v;
        }
        get combineConfig() {
            return this.combineWith(VAddr.config) as VSelect.configType;
        }
    }
</script>

<style scoped lang="scss">
    #VJAddr {
    }
</style>
